<template>
  <i :class="menuIcon" @click="handleMenuChange" />
</template>

<script>
import { mapActions, mapState } from 'vuex'
export default {
  computed: {
    ...mapState('user', ['isCollapse']),
    menuIcon() {
      return this.isCollapse ? 'el-icon-s-fold' : 'el-icon-s-unfold'
    }
  },
  methods: {
    ...mapActions('user', ['handleMenuChange'])
  }
}
</script>
